//装饰器工具类
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class Decorations {
  static BoxBorder lineBoxBorder(
    BuildContext context, {
    double width,
    Color color,
    bool left: false,
    bool top: false,
    bool right: false,
    bool bottom: false,
  }) {
    BorderSide side = BorderSide(
      width: 0.4,
      color: Theme.of(context).hintColor.withOpacity(0.2),
      style: BorderStyle.solid,
    );
    return Border(
      left: left ? side : BorderSide.none,
      top: top ? side : BorderSide.none,
      right: right ? side : BorderSide.none,
      bottom: bottom ? side : BorderSide.none,
    );
  }
}
